package com.yuyou.fn.tradingservice.service;

import com.github.wens.framework.service.ISuperService;
import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.platform.entity.SysUser;
import com.yuyou.fn.tradingservice.entity.ServiceOrder;
import com.yuyou.fn.tradingservice.entity.ServiceProduct;
import com.yuyou.fn.tradingservice.vo.ServiceOrderItemVo;
import com.yuyou.fn.tradingservice.vo.ServiceOrderVo;
import com.yuyou.fn.tradingservice.vo.ServiceProductOrderVo;

import java.util.List;

/**
 *
 * ServiceOrder 表数据服务层接口
 *
 */
public interface IServiceOrderService extends ISuperService<ServiceOrder,Long> {

    Page<ServiceOrder> findOrderForPage(ServiceOrderVo orderVo, int pageNo, int pageSize);

    ServiceOrder generateOrder(Long addressId, SysUser user, List<Long> cartItemIds);

    ServiceOrder generateSingleOrder(Long addressId, SysUser user, Long productId, int quantity);

    ServiceOrder generateServiceOrder(SysUser user, ServiceProduct product, String requirement, String phoneNo, int quantity, Long price);

    Page<ServiceProductOrderVo> findPageOrderList(ServiceOrderVo serviceOrderVo,int pageNo,int pageSize);

    Page<ServiceOrder> findOrderPage(Integer type, Long userId,int pageNo,int pageSize);

    ServiceProductOrderVo findPageOrderDetail(Long orderId);

    void changOrderStatus(Long orderId,Integer status);

    void confirmPayOrder(Long orderId);

    void cancelOrder(Long orderId);

    void refundOrder(Long orderId);

    void confirmOrder(Long orderId);

    void payOrder(Long orderId, Integer payWay);

    Page<ServiceOrderItemVo> findPageOrderSellList(ServiceOrderItemVo serviceOrderItemVo, int pageNo, int pageSize);

    void generateRoomTime(Long orderId);
}